const key = 'userInfo'
const tokenKey= 'token'

export const setUserInfo = (userInfo) => {
  wx.setStorageSync(key, userInfo)
}

export const getUserInfo = () => {
  return wx.getStorageSync(key) || null
}
export const removeUserInfo  = () => {
  wx.setStorageSync(key, '')
}

export const setTokenKey = (token) => {
  wx.setStorageSync(tokenKey, 'Bearer '+token)
}
export const getTokenKey = () => {
  return wx.getStorageSync(tokenKey) || null
}
export const removeTokenKey = () => {
  wx.setStorageSync(tokenKey, '')
}

